<template>
    <div class="completePictures">
        <div class="fileList">
            <div class="fileItem" v-for="(item, index) in fileType" :key="item.label">
                <div class="label">{{ `${item.label}：` }}</div>
                <div class="preview">
                    <Upload
                        v-if="!CheckApplication.isModify"
                        :uploadImage.sync="fileList[index].reconnaissanceFiles"
                    ></Upload>

                    <el-image
                        v-else
                        v-for="(img, ind) in srcUrl[index]"
                        :key="`${ind}img`"
                        style="width: 165px; height: 165px"
                        :src="img"
                        :preview-src-list="srcUrl[index]"
                    >
                        <div slot="error" class="el-image-error">暂无图片</div>
                    </el-image>
                </div>
            </div>
            <div class="fileItem block">
                <div class="label">竣工图</div>
                <div class="preview">
                    <el-upload
                        v-if="!CheckApplication.isModify"
                        class="upload-demo"
                        :action="uploadHttp"
                        :on-remove="handleRemove"
                        :on-success="handleChange"
                        :headers="{ token: getToken() }"
                    >
                        <el-button size="small" type="primary">点击上传</el-button>
                    </el-upload>
                    <div v-else>
                        <a v-for="(img, index) in builtImgs" :key="`builtImg${index}`" @click="handleBuiltImg(img)">
                            {{ img.name }}
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import CompletePictures from './CompletePictures.js';
export default {
    ...CompletePictures
};
</script>

<style lang="less" scoped>
@import 'CompletePictures.less';
</style>
